package jessyka.macedo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;
import android.widget.Toast;

public class GridInicio extends Activity {

	GridView gridView;
	
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.inicio);

		gridView = (GridView) findViewById(R.id.gridView);
		gridView.setAdapter(new ImageAdapter(this));

		gridView.setOnItemClickListener(new OnItemClickListener() {
			public void onItemClick(AdapterView<?> parent, View v,
					int position, long id) {
				if (position == 1) {
					startActivity(new Intent(GridInicio.this,
							MenuGraduacao.class));
					// startActivity(new 	Intent("android.intent.action.LISTVIEW"));
				}

				Toast.makeText(GridInicio.this, "" + position,
						Toast.LENGTH_SHORT).show();
			}
		});
	}
}
